<template>
	<div class="content about">
		<!-- <mp-loadmore type="loading" v-if="pload" /> -->
		<template v-if="data">
			<div class="img">
				<img mode="widthFix" :src="img + data.headUrl" />
			</div>
			<div class="info">
				<!-- <div v-html="data.brief"></div> -->
			</div>
			<div class="title">
        <span class="title-name">联系方式：</span>
				<span>{{data.phone}}</span>
			</div>
			<div class="title">公司形象</div>
			<div class="img imgs">
				<img mode="widthFix" :src="img + data.particulars" />
			</div>
			<div class="title">企业展示</div>
			<div class="img imgs">
				<img mode="widthFix" :src="img + data.photoUrl" />
			</div>
		</template>
	</div>
</template>
<script>
import { getAbout } from '@/utils/api'
import { config } from '@/utils/config'
// import MpLoadmore from 'mp-weui/packages/loadmore'
export default {
  components: {
    // MpLoadmore
  },
  data () {
    return {
      data: null,
      // pload: false,
      img: config.img
    }
  },
  methods: {
    async getData () {
      // this.pload = true
      wx.showLoading({ title: '加载中...' })
      try {
        let res = await getAbout()
        this.data = res
        // console.log(this.data)
        wx.setNavigationBarTitle({
          title: this.data.appletName
        })
        wx.setNavigationBarColor({
          frontColor: '#ffffff',
          backgroundColor: '#cc3300'
        })
        wx.hideLoading()
      } catch (e) {
        console.log(e)
      }
      // this.pload = false
    }
  },
  created () {
    this.getData()
  }
}
</script>
<style scoped lang="scss">
.about {
  .img {
    display: flex;
  }

  .imgs {
    padding: 10px;
  }

  .img img {
    flex: 1;
    width: 100%;
    overflow: hidden;
  }

  .info {
    font-size: 28px;
    padding: 10px;
  }

  .title {
    display: flex;
    border-bottom: 1px #ccc solid;
    font-size: 32px;
    padding: 5px 10px;
    margin-top: 20px;
    justify-content: space-between;
  }
  .title-name{
    width: 200px;
  }
}
</style>